<!DOCTYPE html>
<html lang="zh-CN">
  <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta content="yes" name="apple-mobile-web-app-capable" />
  <meta content="black" name="apple-mobile-web-app-status-bar-style" />
  <meta name="referrer" content="never">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <meta name="author" content="kveln">
  <title>thiswind</title>
  <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
  <!-- <link href="https://www.thiswind.work/media/css/bootstrap.min.css" rel="stylesheet"> -->
  <!--  <link href="https://www.thiswind.work/media/css/all.min.css" rel="stylesheet" type="text/css"> -->
  <link href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.min.css" rel="stylesheet">
  <link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
  <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
  <link rel="alternate" type="application/rss+xml" title="thiswind » Feed" href="https://www.thiswind.work/atom.xml">
  <link rel="stylesheet"href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.10/build/styles/androidstudio.min.css">
  <link href="https://www.thiswind.work/styles/main.css" rel="stylesheet">
  <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.15.10/build/highlight.min.js"></script>
  <!-- <script src="https://www.thiswind.work/media/scripts/jquery.min.js"></script> -->
  <script>hljs.initHighlightingOnLoad();</script>
  
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-152960855-1"></script>
  <script>window.dataLayer = window.dataLayer || [];
    function gtag() {
      dataLayer.push(arguments)
    }
    gtag('js', new Date());
    gtag('config', 'UA-152960855-1');</script>
  

  </head>
  <body>
     <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
    <div class="container">
      <a class="navbar-brand" href="https://www.thiswind.work">thiswind</a>
      <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
        Menu
        <i class="fas fa-bars"></i>
      </button>
      <div class="collapse navbar-collapse" id="navbarResponsive">
        <ul class="navbar-nav ml-auto">
          
          <li class="nav-item">
              
              <a class="nav-link" href="/">首页</a>
              
          </li>
          
          <li class="nav-item">
              
              <a class="nav-link" href="/archives">归档</a>
              
          </li>
          
          <li class="nav-item">
              
              <a class="nav-link" href="/tags">标签</a>
              
          </li>
          
          <li class="nav-item">
              
              <a class="nav-link" href="/post/about">关于</a>
              
          </li>
          
        </ul>
      </div>
    </div>
  </nav>
  <header class="masthead" style="background-image: url('https://www.thiswind.work/media/images/home-bg.jpg')">
    <div class="overlay"></div>
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-md-10 mx-auto">
          <div class="site-heading">
            <h1>thiswind</h1>
            <span class="subheading">thiswind：笔记本</span>
          </div>
        </div>
      </div>
    </div>
  </header>
      <div class="container">
    <div class="row">
      <div class="col-lg-8 col-md-10 mx-auto">
       
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/shell-if/">
            <h2 class="post-title">
              shell if
            </h2>
            </a>
            <h3 class="post-subtitle">
              <pre><code class="language-bash">if test -f abc.txt; then
    ls -l abc.txt
fi
</code></pre>
<p>OR</p>
<pre><code class="language-bash">if [ -f abc.txt ]; then
    ls -l abc.txt
fi
</code></pre>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-19</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/shell-test-not/">
            <h2 class="post-title">
              shell test not
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p>The test command syntax is as follows:</p>
<pre><code class="language-bash">! expression
</code></pre>
<p>OR</p>
<pre><code class="language-bash">[ ! expression ]
</code></pre>
<p>OR</p>
<pre><code class="language-bash">if test ! condition
then
     command1
     command2
fi
if [ ! condition ]
then
     command1
     command2
fi
</code></pre>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-19</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/ru-he-yong-cutming-ling-zhao-dao-zui-hou-yi-ge-zi-duan/">
            <h2 class="post-title">
              如何用`cut`命令找到最后一个字段
            </h2>
            </a>
            <h3 class="post-subtitle">
              <pre><code class="language-bash">pwd | rev | cut -d &quot;/&quot; -f 1 | rev
</code></pre>
<p>原理：</p>
<ol>
<li>逆向</li>
<li>切分，找到第一项</li>
<li>逆向，还原</li>
</ol>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-19</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/latex-shu-xue-gong-shi/">
            <h2 class="post-title">
              LaTeX数学公式
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mtext>被减数</mtext><mo>−</mo><mtext>减数</mtext><mo>=</mo><mtext>差</mtext></mrow><annotation encoding="application/x-tex">\text{被减数}-\text{减数}=\text{差}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.76666em;vertical-align:-0.08333em;"></span><span class="mord text"><span class="mord cjk_fallback">被减数</span></span><span class="mspace" style="margin-right:0.2222222222222222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222222222222222em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord text"><span class="mord cjk_fallback">减数</span></span><span class="mspace" style="margin-right:0.2777777777777778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2777777777777778em;"></span></span><span class="base"><span class="strut" style="height:0.68333em;vertical-align:0em;"></span><span class="mord text"><span class="mord cjk_fallback">差</span></span></span></span></span></p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mover><mover><mrow><mn>0</mn><mo separator="true">,</mo><mn>0</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>0</mn></mrow><mo stretchy="true">⏞</mo></mover><mtext>共n项</mtext></mover></mrow><annotation encoding="application/x-tex">\overbrace{0,0,\dots,0}^{\text{共n项}}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:2.165211em;vertical-align:-0.19444em;"></span><span class="mord mover"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.970771em;"><span style="top:-3.29244em;"><span class="pstrut" style="height:3.29244em;"></span><span class="mord mover"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.29244em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord">0</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord">0</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord">0</span></span></span><span class="svg-align" style="top:-3.74444em;"><span class="pstrut" style="height:3em;"></span><span class="stretchy" style="height:0.548em;min-width:1.6em;"><span class="brace-left" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMinYMin slice'><path d='M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z'/></svg></span><span class="brace-center" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMidYMin slice'><path d='M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z'/></svg></span><span class="brace-right" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMaxYMin slice'><path d='M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z'/></svg></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.19444em;"><span></span></span></span></span></span></span><span style="top:-4.78488em;"><span class="pstrut" style="height:3.29244em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord cjk_fallback mtight">共</span><span class="mord mtight">n</span><span class="mord cjk_fallback mtight">项</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.19444em;"><span></span></span></span></span></span></span></span></span></p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><munder><munder><mrow><mn>0</mn><mo separator="true">,</mo><mn>0</mn><mo separator="true">,</mo><mo>…</mo><mo separator="true">,</mo><mn>0</mn></mrow><mo stretchy="true">⎵</mo></munder><mi>n</mi></munder></mrow><annotation encoding="application/x-tex">\underbrace{0,0,\dots,0}_{n}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.988272em;vertical-align:-1.343832em;"></span><span class="mord munder"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.6444400000000001em;"><span style="top:-1.656168em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathdefault mtight">n</span></span></span></span><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord munder"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.64444em;"><span class="svg-align" style="top:-2.15756em;"><span class="pstrut" style="height:3em;"></span><span class="stretchy" style="height:0.548em;min-width:1.6em;"><span class="brace-left" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMinYMin slice'><path d='M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z'/></svg></span><span class="brace-center" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMidYMin slice'><path d='M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z'/></svg></span><span class="brace-right" style="height:0.548em;"><svg width='400em' height='0.548em' viewBox='0 0 400000 548' preserveAspectRatio='xMaxYMin slice'><path d='M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z'/></svg></span></span></span><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord">0</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord">0</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="minner">…</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.16666666666666666em;"></span><span class="mord">0</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.8424400000000001em;"><span></span></span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:1.343832em;"><span></span></span></span></span></span></span></span></span></p>
<p><span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi mathvariant="bold">X</mi></mrow><annotation encoding="application/x-tex">\mathbf{X}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.68611em;vertical-align:0em;"></span><span class="mord"><span class="mord mathbf">X</span></span></span></span></span>\<br>
<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi mathvariant="normal">e</mi></mrow><annotation encoding="application/x-tex">\mathrm{e}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.43056em;vertical-align:0em;"></span><span class="mord"><span class="mord mathrm">e</span></span></span></span></span>\<br>
<span class="katex"><span class="katex-mathml"><math><semantics><mrow><mi mathvariant="normal">i</mi></mrow><annotation encoding="application/x-tex">\mathrm{i}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.66786em;vertical-align:0em;"></span><span class="mord"><span class="mord mathrm">i</span></span></span></span></span></p>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-16</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/pandoc-citeproc/">
            <h2 class="post-title">
              pandoc-citeproc
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p>brew install pandoc-citeproc</p>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-15</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/zotero-style-repository/">
            <h2 class="post-title">
              Zotero Style Repository
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p>下载地址： <a href="https://www.zotero.org/styles/?q=chinese-gb7714-2005">https://www.zotero.org/styles/?q=chinese-gb7714-2005</a></p>
<img src="/post-images/1573827065399.png" width="100%" height="100%">
            </h3>
          <p class="post-meta">
             <span class="time">2019-11-15</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/quote-this-to-prevent-word-splitting/">
            <h2 class="post-title">
              Quote this to prevent word splitting
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p>Problematic code:</p>
<pre><code class="language-bash">ls -l $(getfilename)
</code></pre>
<p>Correct code:</p>
<pre><code class="language-bash">ls -l &quot;$(getfilename)&quot;
</code></pre>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-15</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/brew-daily-work/">
            <h2 class="post-title">
              Brew daily work
            </h2>
            </a>
            <h3 class="post-subtitle">
              <pre><code class="language-bash">brew update
brew upgrade
brew cleanup
brew cleanup --prune 7	# older than 7 days
</code></pre>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-15</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/gitlab-runner-yi-ding-yao-shou-dong-an-zhuang-bu-neng-tong-guo-brew-an-zhuang/">
            <h2 class="post-title">
              gitlab-runner 一定要手动安装，不能通过 brew 安装
            </h2>
            </a>
            <h3 class="post-subtitle">
              <p>否则会下载错误的 gitlab-runner-helper 的docker镜像（已经过期，删掉了，下载不到了）</p>

            </h3>
          <p class="post-meta">
             <span class="time">2019-11-15</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        <div class="post-preview">
          <a href="https://www.thiswind.work/post/about/">
            <h2 class="post-title">
              关于
            </h2>
            </a>
            <h3 class="post-subtitle">
              
            </h3>
          <p class="post-meta">
             <span class="time">2019-01-25</span>
             <span>,</span>
             <span class="post-stats">1 min read</span>
            </p>
        </div>
        <hr>
        <div class="clearfix">
        </div>
        
        
        <a class="btn btn-primary float-left" href="https://www.thiswind.work/">&larr; 上一页</a>
        
        
      </div>
    </div>
  </div>

  
    <!-- Footer -->
  <footer>
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-md-10 mx-auto">
          <ul class="list-inline text-center">
            
            
              
            
              
            
              
            
              
            
              
            
              
            
              
              <li class="list-inline-item">
              <a href="https://www.thiswind.work/atom.xml" target="_blank">
                <span class="fa-stack fa-lg">
                  <i class="fas fa-circle fa-stack-2x"></i>
                  <i class="fas fa-rss fa-stack-1x fa-inverse"></i>
                </span>
              </a>
              </li>
          </ul>
          <p class="copyright text-muted">Copyright &copy;<span>thiswind</span><br><a href="https://github.com/getgridea/gridea" class="Themeinfo">Powered by Gridea</a></p>
        </div>
      </div>
    </div>
   </footer>
  <!-- Bootstrap core JavaScript -->
  <script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
  <!-- <script src="https://www.thiswind.work/media/scripts/bootstrap.bundle.min.js"></script> -->
  <!-- Bootstrap core JavaScript -->
  <script src="https://cdn.jsdelivr.net/gh/Alanrk/clean-cdn@1.0/scripts/clean-blog.min.js"></script>
  <!-- <script src="https://www.thiswind.work/media/scripts/clean-blog.min.js"></script> -->
  <script src="//instant.page/3.0.0" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>
  <style type="text/css">a.back_to_top{text-decoration:none;position:fixed;bottom:40px;right:30px;background:#f0f0f0;height:40px;width:40px;border-radius:50%;line-height:36px;font-size:18px;text-align:center;transition-duration:.5s;transition-propety:background-color;display:none}a.back_to_top span{color:#888}a.back_to_top:hover{cursor:pointer;background:#dfdfdf}a.back_to_top:hover span{color:#555}@media print,screen and(max-width:580px){.back_to_top{display:none!important}}</style>
<a id="back_to_top" href="#" class="back_to_top">
  <span>▲</span></a>
<script>$(document).ready((function(_this) {
    return function() {
      var bt;
      bt = $('#back_to_top');
      if ($(document).width() > 480) {
        $(window).scroll(function() {
          var st;
          st = $(window).scrollTop();
          if (st > 30) {
            return bt.css('display', 'block')
          } else {
            return bt.css('display', 'none')
          }
        });
        return bt.click(function() {
          $('body,html').animate({
            scrollTop: 0
          },
          800);
          return false
        })
      }
    }
  })(this));</script>
  </body>
</html>
